package com.ll.ptgkanshuprovideruac.service;

import com.ll.ptgkanshuprovideruac.model.domain.RespBean;

public interface AuthService {
    
    /**
     * 根据code获得Token
     *
     * @author ll
     * @date 2019/11/13 11:13 AM
     * @param code 
     * @return com.ll.ptgkanshuprovideruac.model.domain.RespBean
     */
    RespBean getAccessToken(String code);
    
    /**
     * 根据code获得Token
     *
     * @author ll
     * @date 2019/11/13 11:14 AM
     * @param accessToken 
     * @return com.ll.ptgkanshuprovideruac.model.domain.RespBean
     */
    RespBean getOpenId(String accessToken);

    /**
     * 刷新Token
     *
     * @author ll
     * @date 2019/11/13 11:19 AM
     * @param code
     * @return com.ll.ptgkanshuprovideruac.model.domain.RespBean
     */
    RespBean refreshToken(String code);

    /**
     * 拼接授权URL
     *
     * @author ll
     * @date 2019/11/13 11:21 AM
     * @return com.ll.ptgkanshuprovideruac.model.domain.RespBean
     */
    RespBean getAuthorizationUrl();

    /**
     * 根据Token和OpenId获得用户信息
     *
     * @author ll
     * @date 2019/11/13 11:24 AM
     * @param accessToken
     * @param openId
     * @return com.ll.ptgkanshuprovideruac.model.domain.RespBean
     */
    RespBean getUserInfo(String accessToken, String openId);
}
